<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class TaskMubu extends MY_Controller
{
	//取得帮助任务列表,将uid设为3
	public function getmubu($taskid)
	{
        $sql="select id,title,parent,uid,parents,reverse(concat(id,',',parents)) as rps,length(parents)-length(replace(parents,',','')) as lc from task where FIND_IN_SET(".$taskid.",parents) order by rps,sort desc;";
        // SELECT id,title,parent,parents,reverse(parents) as rps FROM `task` where parents is not null AND parents<>"" order by rps;
        $this->query_to_json($sql);
	}


}